#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int removeElement(int* nums, int numsSize, int val) {
    int src = 0;
    int dst = 0;
    for (int i = 0; i < numsSize; i++) {
        if (nums[src] != val) {
            nums[dst++] = nums[src++];
        }
        else
            src++;
    }
    return dst;
}